package com.joysuch.wwyt.mh.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.joysuch.wwyt.core.bean.SimpleIdMapping;
import com.joysuch.wwyt.mh.bean.MhMajorHazardTaskRecordItemSearchBean;
import com.joysuch.wwyt.mh.bean.MhMajorHazardTaskRecordSearchBean;
import com.joysuch.wwyt.mh.bean.vo.MhMajorHazardTaskRecordGetVO;
import com.joysuch.wwyt.mh.bean.vo.MhMajorHazardTaskRecordItemVO;
import com.joysuch.wwyt.mh.bean.vo.MhMajorHazardTaskRecordVO;
import com.joysuch.wwyt.mh.entity.MhMajorHazardTaskRecord;
import com.joysuch.wwyt.mh.entity.MhMajorHazardTaskRecordItem;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zqw
 * @since 2022-05-24
 */
@Repository
public interface MhMajorHazardTaskRecordMapper extends BaseMapper<MhMajorHazardTaskRecord> {

    Page<MhMajorHazardTaskRecordVO> findTaskRecordPage(Page<MhMajorHazardTaskRecordVO> page , Long currentUserId, @Param("authDepartIds") List<Long> authDepartIds, @Param("mhMajorHazardTaskRecordSearchBean") MhMajorHazardTaskRecordSearchBean mhMajorHazardTaskRecordSearchBean);

    MhMajorHazardTaskRecordGetVO findTaskRecordGetList(Long id);

    List<SimpleIdMapping> findByRecordIds(@Param("recordIds") List<Long> recordIds);


    void deleteItemById(Long id);

    Page<MhMajorHazardTaskRecordItemVO> findTaskRecordItemList(Page<MhMajorHazardTaskRecordItemVO> page , MhMajorHazardTaskRecordItemSearchBean mhMajorHazardTaskRecordItemSearchBean);

    List<MhMajorHazardTaskRecordItem> findByRecordIdByItem(@Param("recordId") Long recordId);


}
